
import { Entity, NgField, NgObject, EntityList, NgList, NgDynamic, DynamicEntity, NgEntity } from '@farris/devkit';
import { ZdcdEntity } from './zdcdentity';
import { XlzlEntity } from './xlzlentity';
import { XstgEntity } from './xstgentity';
import { GhfaEntity } from './ghfaentity';
import { TgfaEntity } from './tgfaentity';
import { ScfaEntity } from './scfaentity';
import { PathHierarchyInfo2379Entity } from './pathhierarchyinfo2379entity';

@NgEntity({
    originalCode: "glzd",
    nodeCode: "glzds"
})
export class GlzdEntity extends Entity {

    @NgField({
        originalDataField: 'ID',
        dataField: 'id',
        primary: true,
        originalDataFieldType: 'String',
        initValue: '',
        path: 'ID',

        validRules: [
            {
                type: 'required',
                constraints: [true],
            },
            {
                type: 'maxLength',
                constraints: [36],
                message: '最大长度为36',
            }
        ]
    })
    id: string;

    @NgField({
        originalDataField: 'Version',
        dataField: 'version',
        originalDataFieldType: 'DateTime',
        initValue: '0001-01-01T00:00:00',
        path: 'Version',
        enableTimeZone: true,
    })
    version: string;

    @NgField({
        originalDataField: 'MerchantName',
        dataField: 'merchantName',
        originalDataFieldType: 'String',
        initValue: '',
        path: 'MerchantName',

        validRules: [
            {
                type: 'maxLength',
                constraints: [36],
                message: '最大长度为36',
            }
        ]
    })
    merchantName: string;

    @NgField({
        originalDataField: 'MerchantCode',
        dataField: 'merchantCode',
        originalDataFieldType: 'String',
        initValue: '',
        path: 'MerchantCode',

        validRules: [
            {
                type: 'maxLength',
                constraints: [36],
                message: '最大长度为36',
            }
        ]
    })
    merchantCode: string;

    @NgField({
        originalDataField: 'Adminstrator',
        dataField: 'adminstrator',
        originalDataFieldType: 'String',
        initValue: '',
        path: 'Adminstrator',

        validRules: [
            {
                type: 'maxLength',
                constraints: [36],
                message: '最大长度为36',
            }
        ]
    })
    adminstrator: string;

    @NgField({
        originalDataField: 'glzdfl',
        dataField: 'glzdfl',
        originalDataFieldType: 'String',
        initValue: '',
        path: 'glzdfl',

        validRules: [
            {
                type: 'maxLength',
                constraints: [36],
                message: '最大长度为36',
            }
        ]
    })
    glzdfl: string;

    @NgField({
        originalDataField: 'glzdbh',
        dataField: 'glzdbh',
        originalDataFieldType: 'String',
        initValue: '',
        path: 'glzdbh',

        validRules: [
            {
                type: 'maxLength',
                constraints: [36],
                message: '最大长度为36',
            }
        ]
    })
    glzdbh: string;

    @NgField({
        originalDataField: 'glzdbz',
        dataField: 'glzdbz',
        originalDataFieldType: 'String',
        initValue: '',
        path: 'glzdbz',

        validRules: [
            {
                type: 'maxLength',
                constraints: [36],
                message: '最大长度为36',
            }
        ]
    })
    glzdbz: string;

    @NgList({
        dataField: 'zdcds',
        originalDataField: '',
        type: ZdcdEntity

    })

    zdcds: EntityList<ZdcdEntity>;
    @NgList({
        dataField: 'xlzls',
        originalDataField: '',
        type: XlzlEntity

    })

    xlzls: EntityList<XlzlEntity>;
    @NgList({
        dataField: 'xstgs',
        originalDataField: '',
        type: XstgEntity

    })

    xstgs: EntityList<XstgEntity>;
    @NgList({
        dataField: 'ghfas',
        originalDataField: '',
        type: GhfaEntity

    })

    ghfas: EntityList<GhfaEntity>;
    @NgList({
        dataField: 'tgfas',
        originalDataField: '',
        type: TgfaEntity

    })

    tgfas: EntityList<TgfaEntity>;
    @NgList({
        dataField: 'scfas',
        originalDataField: '',
        type: ScfaEntity

    })

    scfas: EntityList<ScfaEntity>;
    @NgObject({
        dataField: 'treeInfo',
        originalDataField: 'TreeInfo',
        hierarchyType:'path',
        type: PathHierarchyInfo2379Entity
    })
    treeInfo: PathHierarchyInfo2379Entity;
}